<%@page import="java.sql.*" %>
<%@page import="java.sql.PreparedStatement" %>
<%@page import="java.sql.ResultSet" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
   
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>知乎</title>
 <link rel="stylesheet" href="style/index.css">
 <script>
onload=function(){
    var fhjg=document.getElementById('Nosession').innerHTML;
    if(fhjg!=""){
        alert(fhjg);
        }
}
</script>
</head>
<body>

<%  Object username = request.getSession().getAttribute("pname");  //登录传递过来的凭证
%>

 <font color=red  id='Nosession' hidden>${Nosession}</font>

<!-----------导入hread.jsp--------------->
<%@include file="hread.jsp" %>

<!-----------中间--------------->
    <div class=content>
    
        <!-----中间左边---->
    <div class=content-left>
        <!------中间左边上部分---宣传图片---->
     <div class=content-left-top>
         
     </div>
     <!------中间左边下部分------->
    <div class=content-left-bottom>
        <div class="content-title">
            <ul>
                <a href="#"><li style="color:tomato">推荐</li></a>
                <a href="#"><li>关注</li></a>
                <a href="#"><li>热榜</li></a>
            </ul>
        </div>


<!---------循环数据-->

<c:forEach var="Question" items="${QuestionList}">
     <div class=content-content>
      <a href="itemServlet.do?qid=${Question.q_id}"><h3>${Question.q_title}</h3></a>
        <div class=title-content>
       <img src="image/tx.jpg" >
      <div class=title-nr>
          <div class=p-nr>
       <p>${Question.q_describe}</p>
        </div>
        </div>
        <div class=userxx style="margin-top:5px">
        <span>作者：</span><span style="color:red">${Question.post_name}</span> <span>发布时间：</span> <span style="color:red">${Question.post_date}</span>
       </div>
        </div>       
        </div>
</c:forEach>
        

    </div>
    </div>
    <!------中间右边部分------->
    <div class=content-right>
    <div class=content-right-top> 
    <a href="postQuestion.jsp"><div class=item><div class=item-i id=item-one><img src="image/发布.png" width=30px; height=30px;></div><p>发布问题</p></div></a>
    <a href=""><div class=item><div class=item-i id=item-two><img src="image/写作业.png" width=30px; height=30px;></div><p>回答问题</p></div></a>
    <a href=""><div class=item><div class=item-i id=item-three><img src="image/写作业、书.png" width=30px; height=30px;></div><p>写文章</p></div></a>
    <a href=""><div class=item><div class=item-i id=item-four><img src="image/发明想法.png" width=30px; height=30px;></div><p>写想法</p></div></a>
    </div>
   <div class=content-right-bottom>
       <a href="userCenterServlet.do"><div class=one-left><p>个人中心</p></div></a>
       <a href="admlogin.jsp"><div class=one-right><p>后台管理</p></div></a>
   </div>
    </div>
    </div>
</body>
</html>